home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / docs / misc / amigapl.9903.lzh / amigapl.9903 / pci.lzx / Include / resources / pci.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-24  |  2.2 KB  |  75 lines

  1. #ifndef    RESOURCES_PCI_H
  2. #define RESOURCES_PCI_H 1
  3.  
  4. /*
  5. **    $VER: micronik_pci.h 1.0 (22.12.9)
  6. **
  7. **    micronik_pci.resource include file
  8. **
  9. **    (C) Copyright 1997-1998 MicroniK
  10. **        All Rights Reserved
  11. **
  12. */
  13. #ifndef    EXEC_TYPES_H
  14. #include "exec/types.h"
  15. #endif
  16.  
  17.  
  18. #include <exec/semaphores.h>
  19.  
  20.  
  21. #define PCIRESNAME    "micronik_pci.resource"
  22.  
  23. /* Structures used by the micronik_pci.resource        */
  24.  
  25. /* PCI spaces & flags */
  26.  
  27. /* space - PCI IO Space  */
  28. #define SPACE_IO                0
  29.  
  30. /* space - PCI Memory Space  */
  31. #define SPACE_MEMORY            1
  32.  
  33.  
  34. /* flags - PCI page can be shared with other processes */
  35. #define PCIF_SHARE              1
  36.  
  37. /* flags - PCI page address can be changed using MovePCIPage */
  38. #define PCIF_MOVABLE            2
  39.  
  40. /* flags - PCI page can use copy-back mode */
  41. #define PCIF_FIFO               4
  42.  
  43.  
  44. /* structure used to pass required PCI page parameters */
  45. struct PCIPage {
  46.     ULONG       address;  /* whenever address is ULONG - this is PCI address */
  47.     UBYTE       sizebits; /* now many address bits inside page          */
  48.                           /* all pages are aligned to their size        */
  49.     UBYTE       space;    /* which PCI address space (IO or MEMORY)     */
  50.     UBYTE       flags;    /* SHARE, MOVABLE                             */
  51.     UBYTE       pad1;
  52. };
  53.  
  54. /* structure used to receive parameter of allocated PCI page */
  55. struct PCIDef {
  56.     struct PCIPage def;        /* PCI parameters of allocated window   */
  57.     APTR        pcid_address;  /* APTR - used to specify M68k address  */
  58.                                /* M68k address of PCI window           */
  59. };
  60.  
  61. /* complex structure used to exchange information with pci.resource */
  62. struct PCIMapping {
  63.     struct PCIPage      request;     /* required window parameters     */
  64.     struct PCIDef       window;      /* parameters of allocated window */
  65.     APTR                m68_address; /* M68k address of required PCI address */
  66.                                      /* space - you size of PCI page   */
  67.                                      /* can be greater than required   */
  68.     ULONG               reserved[6]; /* to internal use of resource    */
  69.                                      /* do not modify !!!!             */
  70. };
  71.  
  72. #endif    /* RESOURCES_PCI_H */
  73.  
  74.  
  75.